<div class="header">
  <div class="time_selector">
    <!-- Years begin -->
    <div class="level1h">
      <div class="yearLabel"><g:message code="g.gallery.year" /></div>
      <g:if test="${ytags?.size() > 0}">
        <ul class="tag_selector">
        <g:each var="y" in="${ytags}">
          <g:if test="${y.name == ytag.name}">
            <li class="tab l1 highlight1">${y.name}</li>
          </g:if>
          <g:else>
            <li class="tab l1"><g:link action="index" params="[year:y.name]">${y.name}</g:link></li>
          </g:else>
        </g:each>
        </ul>
      </g:if>
      <g:else>
        <div class="tab l1">
          <g:message code="g.gallery.noyears" />
        </div>
      </g:else>
      <div style="clear: both"></div>
    </div>
    <!-- Years end -->

    <!-- Months begin -->
    <div class="level2h">
      <div class="monthLabel"><g:message code="g.gallery.month" /></div>
      <g:if test="${mtags?.size() > 0}">
        <ul class="tag_selector">
        <g:each var="m" in="${mtags}">
          <g:if test="${m.name == mtag.name}">
            <li class="tab l2 highlight2">${monthMap[m.name]}</li>
          </g:if>
          <g:else>
            <li class="tab l2"><g:link action="index" params="[year:ytag.name,month:m.name]" >${monthMap[m.name]}</g:link></li>
          </g:else>
        </g:each>
        </ul>
      </g:if>
      <g:else>
        <div class="tab l2">
          <g:message code="g.gallery.nomonths" />
        </div>
      </g:else>
    </div>
    <div class="clr"></div>
    <!-- Months end -->
  </div>

  <g:if test="${session?.role == Constants.adminRole}">
    <div class="navigation">
      <g:link controller="upload" action="index" class="button">
        <g:message code="g.gallery.upload" />
      </g:link>
    </div>
  </g:if>
  <div class="clr"></div>
</div>